package com.es.demo.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @author chenx
 * @date 2022/12/28-15:31
 */
public class ESSearchTestDTO implements Serializable {

    private static final long serialVersionUID = 1968695074869817057L;
    private Long id;
    private String name;
    private Date timestamp;
    private Double price;
    private String pic;
    private String description;
    private Integer studymodel;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ESSearchTestDTO that = (ESSearchTestDTO) o;
        if (Objects.equals(id, that.id)){
            return true;
        }
        return Objects.equals(name, that.name) && Objects.equals(timestamp, that.timestamp) && Objects.equals(price, that.price) && Objects.equals(pic, that.pic) && Objects.equals(description, that.description) && Objects.equals(studymodel, that.studymodel);
    }

    @Override
    public String toString() {
        return "ESSearchTestDTO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", timestamp=" + timestamp +
                ", price=" + price +
                ", pic='" + pic + '\'' +
                ", description='" + description + '\'' +
                ", studymodel=" + studymodel +
                '}';
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, timestamp, price, pic, description, studymodel);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getStudymodel() {
        return studymodel;
    }

    public void setStudymodel(Integer studymodel) {
        this.studymodel = studymodel;
    }
}
